<?php
class ShopZone extends CActiveRecord
{
    /**
     * @return string the associated database table name
     */
    public function tableName()
    {
        return 'shop_zone';
    }
    
    public function relations(){
        return array(
            'Pracel' => array(self::HAS_MANY, 'PracelPrice', 'zone_id'),
            'Country' => array(self::HAS_MANY, 'Country', 'zone_id'),
        );
    }

    /**
     * Returns the static model of the specified AR class.
     * Please note that you should have this exact method in all your CActiveRecord descendants!
     * @param string $className active record class name.
     * @return Products the static model class
     */
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }
}
